package com.last.bean;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

@Data
@Document(indexName = "es_house",shards = 2,replicas = 0)
public class SearchBean {
    @Id
    private  Integer id;

    private Integer homeId;

    @Field(type = FieldType.Text,analyzer="ik_max_word")
    private String homeName;

    @Field(type = FieldType.Text,analyzer="ik_max_word")
    private String homeDesc;

    //Keyword不会进行分词
    @Field(type = FieldType.Keyword,index = true)
    private String homePic;

    @Field(type = FieldType.Text,analyzer="ik_max_word")
    private String homeRemark;

    private Integer merchantId;

    private Integer price;
    // 城市
    @Field(type = FieldType.Keyword,index = true)
    private String city;
    // 景点
    @Field(type = FieldType.Keyword,index = true)
    private String area;
}
